#include <fstream>
#include <string>
#include "big_int.h"

int main()
{
   std :: ifstream fin("in.txt");
   std :: ofstream fout("out.txt");
   
   std::string str_a, str_b;
   while (fin >> str_a >> str_b)
   {
      if (str_b == "0")
      {
         fout << "<error>\n\n\n";
         continue;
      }
      big_int a(str_a);
      big_int b(str_b);
      std :: pair<big_int, big_int> answer = a.divide(b);
      fout << answer.first << "\n";
      fout << answer.second << "\n\n";
   }

   fin.close();
   fout.close();
   return 0;
}